package com.hgyc.mom.common.enums;

/**
 * 周期类型字典类
 * 自动生成的枚举类，请勿手动修改

 * @author fwj
 * @since 2025-08-15 15:15:48
 * @version 1.0
 **/
public enum PeriodTypeEnum {
    SHIFT("shift", "班"),
    DAY("day", "日"),
    WEEK("week", "周"),
    MONTH("month", "月"),
    QUARTER("quarter", "季度"),
    YEAR("year", "年")
    ;

    private final String value;
    private final String label;

    PeriodTypeEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return this.value;
    }

    public String getLabel() {
        return this.label;
    }

    public static PeriodTypeEnum of(String value) {
        if (value == null) {
            return null;
        }
        for (PeriodTypeEnum item : PeriodTypeEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.label;
    }
}

